//
//  KZEveryDvdWebController.m
//  xiaorizi
//
//  Created by kun on 15/10/24.
//  Copyright © 2015年 origin. All rights reserved.
//

#import "KZEveryDvdWebController.h"
#import "AFNetworking.h"


@interface KZEveryDvdWebController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property (weak, nonatomic) IBOutlet UIView *themeListView;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *backIButton;

@end



@implementation KZEveryDvdWebController


-(void) viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    self.tabBarController.tabBar.hidden = NO;
}


- (void)viewDidLoad {
    
    self.tabBarController.tabBar.hidden = YES;
    
    [self.backIButton setTitle:@"探店"];
    
    [super viewDidLoad];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.themeurl]]];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

    // Dispose of any resources that can be recreated.
}




//按钮返回界面实现
- (IBAction)backButtonClicked:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}


#pragma mark 专场动画方法
- (IBAction)themeListToWebClicked:(UIButton *)button {
    
    button.selected = !button.selected;
    if(button.selected)
    {
     [UIView transitionFromView:self.webView toView:self.themeListView duration:1 options:UIViewAnimationOptionTransitionFlipFromLeft|UIViewAnimationOptionShowHideTransitionViews completion:nil];
    
    }
    else{
        [UIView transitionFromView:self.themeListView toView:self.webView duration:1 options:UIViewAnimationOptionTransitionFlipFromRight|UIViewAnimationOptionShowHideTransitionViews completion:nil];

    }
}



#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
//- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//    // Get the new view controller using [segue destinationViewController].
//    // Pass the selected object to the new view controller.
//    KZThemeListController *listVc = segue.destinationViewController;
//    
//    [UIView transitionFromView:self.view toView:listVc.view duration:2 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil];
//    
//    
//}


@end
